<!DOCTYPE html>
<html>
<head>
<title>BYD</title>

<link rel="stylesheet" href="../../css/bootstrap.min.css">
<link rel="stylesheet" href="../../css/font-awesome.min.css">
<link rel="stylesheet" href="../../css/AdminLTE.min.css">
<link rel="stylesheet" href="../../css/all-skins.min.css">
<link rel="stylesheet" href="../../plugins/daterangepicker/daterangepicker.css">
<script src="../../libs/jquery.min.js"></script>
<script src="../../libs/bootstrap.min.js"></script>
<script src="../../plugins/daterangepicker/moment.min.js"></script>
<script src="../../plugins/daterangepicker/daterangepicker.js"></script>
<script src="../../libs/vue.min.js"></script>
<script src="../../js/common2.js"></script>
<style type="text/css">
.listBox {
	margin: 10px;
	font-size:12px;
}

.listBox .content {
	padding: 0;
	min-height: 10px;
}

.listBox .content .desc {
	display: block;
	height: 23px;
	height: 32px;
	overflow: hidden;
}

.listBox>div>.row, .listBox .h-0 .row {
	margin: 0;
}

.listBox>div>.row:first-child {
	text-align: center;
	line-height: 40px;
}

.listBox>div {
	border: 1px solid #444;
	border-bottom: none;
}

.listBox [class*="col-md-"] {
	border-right: 1px solid #444;
	border-bottom: 1px solid #444;
}

.listBox [class*="col-md-"]:last-child {
	border-right: none;
}

.h-1>div {
	height: 40px;
}

/*  .h-2>div {
	min-height: 55px;
} 

.h-2>div:first-child {
	line-height: 55px;
} */
.h-3>div {
	min-height: 60px;
	max-height: 110px;
    overflow: auto;
}

.listBox .h-5, .listBox .h-0 {
	height: 270px;
}

.listBox .h-5 {
	line-height: 215px;
}

.content  .cont {
	display: none;
}

.listBox .full .desc {
	display: none;
}

.listBox .full .cont {
	display: block;
}

.w-1>div:nth-child(1), .w-1>div:nth-child(3), .w-1>div:nth-child(4) {
	width: 18.2%;
}

.w-1>div:nth-child(7) {
	width: 18.1%;
	line-height: 40px;
	text-align: center;
}

.w-1>div:nth-child(4), .w-1>div:nth-child(5), .w-1>div:nth-child(6) {
	line-height: 40px;
}

.w-1>div:nth-child(2), .w-1>div:nth-child(5), .w-1>div:nth-child(6) {
	width: 9.1%;
}

.w-2>div:nth-child(1) {
	width: 81.9%;
}

.w-2>div:nth-child(2) {
	width: 18.1%;
	text-align: center;
}

.w-2>div:nth-child(2) button {
	position: absolute;
	top: 30%;
	left: 50%;
	margin-left: -20px;
}
.listBox .h-6{height:210px;overflow:auto;}
/*.listBox>div>.row, .listBox .h-0 .row:last-child  [class*='col-md-'] {
	border-bottom: none;
} */

/*新增*/
.listBox .row.h-6 .row {
	margin: 0;
}

.hideScroll::-webkit-scrollbar {display:none}

#pagenum {
	width: 50px;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    position: relative;
    float: left;
}
</style>
</head>
<body>
	<section class="content" id="rrapp" v-cloak>
		<br /> <input type="hidden" id="hidScrollTopSize" value="0" />		
		<div v-show="showList">
			<div class="form-horizontal">
				<div class="box-body">
					<div class="form-group">
						<label for="inputEmail3" class="col-sm-1 control-label">时间：</label>
						<div class="col-sm-10">
							<div class="btn-group">
								<button type="button" class="btn btn-info" @click="clickQuery1($event)">全部</button>
								<button type="button" class="btn btn-info" @click="clickQuery1($event)">7天</button>
								<button type="button" class="btn btn-info" @click="clickQuery1($event)">30天</button>
								<button type="button" class="btn btn-info" id="daterange-btn">
									<span>自定义</span> <i class="fa fa-caret-down"></i>
								</button>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label for="inputEmail3" class="col-sm-1 control-label">平台：</label>
						<div class="col-sm-10">
							<div class="btn-group">
								<button type="button" class="btn btn-info" @click="clickQuery2($event)">全部</button>
								<button type="button" class="btn btn-info" @click="clickQuery2($event)">汽车之家</button>
								<button type="button" class="btn btn-info" @click="clickQuery2($event)">易车</button>
								<button type="button" class="btn btn-info" @click="clickQuery2($event)">新浪汽车</button>
								<button type="button" class="btn btn-info" @click="clickQuery2($event)">太平洋汽车</button>
								<button type="button" class="btn btn-info" @click="clickQuery2($event)">爱卡汽车</button>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label for="inputEmail3" class="col-sm-1 control-label">来源：</label>
						<div class="col-sm-10">
							<div class="btn-group">
								<button type="button" class="btn btn-info" @click="clickQuery3($event)">全部</button>
								<button type="button" class="btn btn-info" @click="clickQuery3($event)">论坛</button>
								<button type="button" class="btn btn-info" @click="clickQuery3($event)">口碑</button>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label for="inputPassword3" class="col-sm-1 control-label">品牌：</label>
						<div class="col-sm-2">
							<select class="form-control" v-model="selected1">
								<option value="0">全部</option>
								<option v-for="item in dim1" :value="item.id">{{ item.name }}</option>
							</select>
						</div>
						<label for="inputPassword3" class="col-sm-1 control-label">车系：</label>
						<div class="col-sm-2">
							<select class="form-control" v-model="selected2">
								<option value="">全部</option>
								<option v-for="item in dim2" :value="item.id">{{ item.name }}</option>
							</select>
						</div>
						<label for="inputPassword3" class="col-sm-1 control-label">车系：</label>
						<div class="col-sm-2">
							<input type="text" class="form-control" v-model="q.selectName" placeholder="车系搜索" />
						</div>
					</div>
					<div class="form-group">
						<label for="inputPassword3" class="col-sm-1 control-label">原文：</label>
						<div class="col-sm-5">
							<input type="text" class="form-control" v-model="q.thread_context" placeholder="原文搜索" />
						</div>
						<div class="col-sm-2">
							<button type="submit" @click="query" class="btn btn-primary">查询</button> 
							<button type="button" @click="setScrollTopSize" class="btn btn-primary">定位</button>
						</div>
						
					</div>
				</div>
			</div>
			<div class="listBox">

				<div class="table  table-sdiviped">

					<div class="row h-1">
						<div class="col-md-1">ID</div>
						<div class="col-md-2">原文</div>
						<div class="col-md-1">车系</div>
						<div class="col-md-2">维度</div>
						<div class="col-md-2">情感</div>
						<div class="col-md-1">句式</div>
						<div class="col-md-1">场景</div>
						<div class="col-md-2">操作</div>
					</div>
					<variant-item :item="item" :index="index" v-for="(item,index) in superviseList"></variant-item>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-5">
					<div class="dataTables_info" id="example1_info" role="status" aria-live="polite">
						总计：<font>{{ page.totalCount }}</font>条记录，当前第<font>{{ page.currPage }}</font>页
					</div>
				</div>
				<div class="col-sm-7">
					<div class="dataTables_paginate paging_simple_numbers" id="example1_paginate">
						<ul class="pagination">
							<li class="paginate_button previous disabled" id="example1_previous"><a href="#" aria-controls="example1" data-dt-idx="0" tabindex="0" @click="flipPages(-1)">上一页</a></li>
							<li class="paginate_button"><input type="text" id="pagenum" value=1 @change="toPage" onkeyup="this.value=this.value.replace(/\D/g,'')"  onafterpaste="this.value=this.value.replace(/\D/g,'')"/></li>
							<li class="paginate_button next disabled" id="example1_next"><a href="#" aria-controls="example1" data-dt-idx="7" tabindex="0" @click="flipPages(1)">下一页</a></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<div v-show="!showList" class="panel panel-default">
			<div class="panel-heading">{{title}}</div>

			<form class="form-horizontal" style="padding: 10px;">
				<br /> <input type="hidden" class="form-control" v-model="supervise.id" placeholder="品牌" />
				<div class="form-group">
					<div class="col-sm-1 control-label">原文</div>
					<div class="col-sm-11">
						<textarea class="form-control" rows="4" v-model="supervise.thread_context" disabled=disabled placeholder="原文"></textarea>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-1 control-label">观点</div>
					<div class="col-sm-11">
						<textarea class="form-control" id="sentence" rows="1" v-model="result.sentence" placeholder="观点"></textarea>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-1 control-label">品牌</div>
					<div class="col-sm-2">
						<select class="form-control" v-model="result.brand" @change="carOnChange($event)">
							<option v-if="result.brand" :value="result.brand">{{result.brand}}</option>
							<option v-for="item in show.car1" :nickname="item.nickname" :value="item.name">{{ item.name }}</option>
						</select>
					</div>
					<div class="col-sm-1 control-label">系列</div>
					<div class="col-sm-2">
						<select class="form-control" v-model="result.series" @change="carOnChange($event)">
							<option v-if="result.series" :value="result.series">{{result.series}}</option>
							<option v-for="item in show.car2" :nickname="item.nickname" :value="item.name">{{ item.name }}</option>
						</select>
					</div>
					<div class="col-sm-1 control-label">型号</div>
					<div class="col-sm-2">
						<select class="form-control" v-model="result.model_num" @change="carOnChange($event)">
							<option v-if="result.model_num" :value="result.model_num">{{result.model_num}}</option>
							<option v-for="item in show.car3" :nickname="item.nickname" :value="item.name">{{ item.name }}</option>
						</select>
					</div>
					<div class="col-sm-1 control-label">别名</div>
					<div class="col-sm-2">
						<input type="text" class="form-control" v-model="result.car_nickname" placeholder="别名" />
					</div>
				</div>

				<div class="form-group">
					<div class="col-sm-1 control-label">一级维度</div>
					<div class="col-sm-2">
						<select class="form-control" v-model="result.first_dim" @change="dimOnChange($event)">
							<option v-if="result.first_dim" :value="result.first_dim">{{result.first_dim}}</option>
							<option v-for="item in show.dim1" :value="item.name">{{ item.name }}</option>
						</select>
					</div>
					<div class="col-sm-1 control-label">二级维度</div>
					<div class="col-sm-2">
						<select class="form-control" v-model="result.second_dim" @change="dimOnChange($event)">
							<option v-if="result.second_dim" :value="result.second_dim">{{result.second_dim}}</option>
							<option v-for="item in show.dim2" :value="item.name">{{ item.name }}</option>
						</select>
					</div>
					<div class="col-sm-1 control-label">三级维度</div>
					<div class="col-sm-2">
						<select class="form-control" v-model="result.third_dim" @change="dimOnChange($event)">
							<option v-if="result.third_dim" :value="result.third_dim">{{result.third_dim}}</option>
							<option v-for="item in show.dim3" :value="item.name">{{ item.name }}</option>
						</select>
					</div>
					<div class="col-sm-1 control-label">四级维度</div>
					<div class="col-sm-2">
						<select class="form-control" v-model="result.fourth_dim" @change="dimOnChange($event)">
							<option v-if="result.fourth_dim" :value="result.fourth_dim">{{result.fourth_dim}}</option>
							<option v-for="item in show.dim4" :weight="item.weight" :type="item.type" :value="item.name">{{ item.name }}</option>
						</select> <input type="hidden" v-model="result.dim_id" />
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-1 control-label">维度描述</div>
					<div class="col-sm-5">
						<textarea class="form-control" v-model="result.dim_des" placeholder="维度描述"></textarea>
					</div>
					<div class="col-sm-1 control-label">维度属性</div>
					<div class="col-sm-2">
						<input type="text" class="form-control" disabled="disabled" v-model="result.dim_type" placeholder="维度属性" />
					</div>
					<div class="col-sm-1 control-label">维度权重</div>
					<div class="col-sm-2">
						<input type="text" class="form-control" disabled="disabled" v-model="result.dim_weight" placeholder="维度权重" />
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-1 control-label">情感筛选</div>
					<div class="col-sm-2">
						<input type="text" class="form-control" id="emoFilter" placeholder="情感词筛选" @input="emoFilterOnChange($event)"/>
					</div>
					<div class="col-sm-1 control-label">情感词</div>
					<div class="col-sm-2">
						<!-- 						<input type="text" class="form-control"  placeholder="情感词" /> -->
						<select class="form-control" v-model="result.emotion_word" @change="emotionOnChange($event)">
							<option value="" worth="0" isfault="0">情感词</option>
<!-- 							<option v-if="result.emotion_word" :value="result.emotion_word">{{result.emotion_word}}</option> -->
							<option v-for="item in show.emotion1" :worth="item.worth" :isfault="item.isfault" :value="item.emotionWord">{{ item.emotionWord }}</option>
						</select>
					</div>
					<div class="col-sm-1 control-label">情感描述</div>
					<div class="col-sm-2">
						<!-- 						<textarea class="form-control"   placeholder="情感描述" ></textarea> -->
						<select class="form-control" v-model="result.emo_des" @change="emotionOnChange($event)">
							<option value="">情感描述</option>
							<option v-if="result.emo_des" :value="result.emo_des">{{result.emo_des}}</option>
							<option v-for="item in show.emotion2" :worth="item.worth" :isfault="item.isfault" :value="item.emotionWord">{{ item.emotionWord }}</option>
						</select>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-1 control-label">情感</div>
					<div class="col-sm-2">
<!-- 						<input type="text" class="form-control" disabled="disabled" v-model="result.emotion" placeholder="情感" /> -->
						<select class="form-control" id="emotion" v-model="result.emotion">
							<option value="中立">中立</option>
							<option value="正面">正面</option>
							<option value="负面">负面</option>
						</select>
					</div>
					<div class="col-sm-1 control-label">极性值</div>
					<div class="col-sm-2">
						<input type="text" class="form-control" disabled="disabled" v-model="result.emotion_worth" placeholder="极性值" />
					</div>
					<div class="col-sm-1 control-label">情感属性</div>
					<div class="col-sm-2">
						<input type="text" class="form-control" disabled="disabled" v-model="result.isFault" placeholder="情感属性" />
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-1 control-label">句式分类</div>
					<div class="col-sm-2">
						<input type="text" disabled="disabled" class="form-control" v-model="result.sen_type" placeholder="句式分类" />
					</div>
					<div class="col-sm-1 control-label">饱和度</div>
					<div class="col-sm-2">
						<input type="text" disabled="disabled" class="form-control" v-model="result.sen_worth" placeholder="饱和度" />
					</div>
					<div class="col-sm-1 control-label">关键词</div>
					<div class="col-sm-2">
						<input type="text" disabled="disabled" class="form-control" v-model="result.sen_keyword" placeholder="关键词" />
					</div>
					<div class="col-sm-1 control-label">句式模式</div>
					<div class="col-sm-2">
						<!-- 						<input type="text" class="form-control" v-model="result.sen_demo" placeholder="句式模式" /> -->
						<select class="form-control" v-model="result.sen_demo" @change="sentenceOnChange($event)">
							<option value="">句式模式</option>
							<option v-if="result.sen_demo" :value="result.emo_des">{{result.sen_demo}}</option>
							<option v-for="item in show.sentencepattern1" :keyWord="item.keyWord" :type="item.type" :sentenceWorth="item.sentenceWorth" :worth="item.worth" :value="item.sentenceDemo">{{ item.sentenceDemo }}</option>
						</select>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-1 control-label">场景分类</div>
					<div class="col-sm-2">
						<input type="text" disabled="disabled" class="form-control" v-model="result.scene" placeholder="场景分类" />
					</div>
					<div class="col-sm-1 control-label">购车场景</div>
					<div class="col-sm-2">
						<input type="text" disabled="disabled" class="form-control" v-model="result.buy_scene" placeholder="购车场景" />
					</div>
					<div class="col-sm-1 control-label">关键词</div>
					<div class="col-sm-2">
						<input type="text" disabled="disabled" class="form-control" v-model="result.scene_key" placeholder="关键词" />
					</div>
					<div class="col-sm-1 control-label">句式模式</div>
					<div class="col-sm-2">
						<!-- 						<input type="text" class="form-control" v-model="result.scene_demo" placeholder="句式模式" /> -->
						<select class="form-control" v-model="result.scene_demo" @change="scenepatternOnChange($event)">
							<option value="">句式模式</option>
							<option v-if="result.scene_demo" :value="result.scene_demo">{{result.scene_demo}}</option>
							<option v-for="item in show.scenepattern1" :scene="item.scene" :keyWord="item.keyWord" :type="item.type" :value="item.sentenceDemo">{{ item.sentenceDemo }}</option>
						</select>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-5 control-label"></div>
					<input v-if="hasPermission('supervise:update')" type="button" id="addNew2" class="btn btn-primary" @click="addNew2" value="新增" /> &nbsp;&nbsp; <input v-if="hasPermission('supervise:update')" type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定" /> &nbsp;&nbsp; <input type="button" class="btn btn-warning" @click="reload" value="返回" />
				</div>
			</form>
		</div>
		</div>
		
	</section>
	<script type="text/javascript">
		$(function() {
			$(".listBox").delegate("a.pull-right", "click", function(e) {
				console.log(444)
				if ($(this).parent().hasClass('full')) {

					$(this).parent().removeClass('full');
					$(this).find('i').removeClass('glyphicon-triangle-top').addClass('glyphicon-triangle-bottom');
					$(this).find('span').text('展开');	
					$(this).parent().parent().parent().find('.w-6').height(270 - $(this).parent().height())
					var $this = $(this);
					setTimeout(function() {
						var Parent3 = $this.parent();
						var Parent2 = $this.parent().parent().parent();
						console.log(555)
						var height3 = Parent3.height();
						Parent3.siblings().height(height3 - 1);
						setTimeout(function() {
							var height0 = Parent2.height();
							Parent2.siblings().height(height0).css('line-height', height0 + 'px');
						})
					}, 0);
				} else {

					$(this).parent().addClass('full');
					$(this).find('i').removeClass('glyphicon-triangle-bottom');
					$(this).find('i').addClass('glyphicon-triangle-top');
					$(this).find('span').text('收起');
					$(this).parent().parent().parent().find('.w-6').height(270 - $(this).parent().height())
					var $this = $(this);
					setTimeout(function() {
						var Parent1 = $this.parent().parent();
						var Parent2 = $this.parent().parent().parent();
						console.log(666)
						var height3 = Parent1.height();
						var height0 = Parent2.height();

						Parent2.siblings().height(height0).css('line-height', height0 + 'px');
						Parent1.children('div:last-child').height(height3 - 1);
					}, 0);

				}
				e.preventDefault();
			})
		})
	</script>
	<script src="../../js/modules/biz/supervise.js"></script>
</body>
</html>